import request from "@/utils/request.js";

/**
 * 获取大宗商品列表
 * @param {Object} data
 */
export function getCommodityList(data) {
	return request.get("commodity/index", data, {
		noAuth: true
	});
}

/**
 * 获取大宗商品详情
 * @param {Object} id
 */
export function getCommodityDetail(id) {
	return request.get(`commodity/detail/${id}`, {}, {
		noAuth: true
	});
}

/**
 * 发布大宗商品
 * @param {Object} data
 */
export function addCommodity(data) {
	return request.post("commodity/add", data);
}